package com.anlogic.sdk.toolchain;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

import org.eclipse.embedcdt.managedbuild.cross.core.preferences.PersistentPreferences;

/**
 * The activator class controls the plug-in life cycle
 */
public class Activator extends AbstractUIPlugin {

	// ------------------------------------------------------------------------

	// The plug-in ID
	public static final String PLUGIN_ID = "com.anlogic.sdk.toolchain"; //$NON-NLS-1$

	public String getBundleId() {
		return PLUGIN_ID;
	}

	// ------------------------------------------------------------------------

	// The shared instance
	private static Activator fgInstance;

	public static Activator getInstance() {
		return fgInstance;
	}

	protected PersistentPreferences fPersistentPreferences;

	public Activator() {

		super();
		fgInstance = this;

		fPersistentPreferences = new PersistentPreferences(PLUGIN_ID);
	}

	// ------------------------------------------------------------------------

	public void start(BundleContext context) throws Exception {
		super.start(context);
	}

	public void stop(BundleContext context) throws Exception {
		super.stop(context);
	}

	public PersistentPreferences getPersistentPreferences() {
		return fPersistentPreferences;
	}

	// ------------------------------------------------------------------------
}